package com.zz.parkingsystem.mapper;

import com.zz.parkingsystem.entity.Checkon;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

/**
* @author zz
* @description 针对表【t_checkOn(考勤表)】的数据库操作Mapper
* @createDate 2022-08-29 19:53:26
* @Entity com.zz.parkingsystem.entity.Checkon
*/
@Mapper
@Repository
public interface CheckonMapper {
    List<Checkon> selectCheck();
    List<Checkon> getAllCheck(Long id);

    int deleteByPrimaryKey(Long id);

    int insert(Checkon record);

    int insertSelective(Checkon record);

    Checkon selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Checkon record);

    int updateByPrimaryKey(Checkon record);

    //根据巡检员id查该巡检对应的考勤表
    Checkon selectByPrimaryKeyByInspectorId(Integer id);
    //根据时间查考勤表当月所有数据
    List selectByPrimaryKeyBytime(@Param("time") Date time,@Param("time") int ins_id);
    //根据时间查考勤表当月正常天数
    int selectByPrimaryKeyBytimeNormal(@Param("time")Date time,@Param("time")int ins_id);
    //根据时间查考勤表当月异常天数
    int selectByPrimaryKeyBytimeLate(@Param("time")Date time,@Param("time")int ins_id);
    //根据考勤状态查出不同状态下的考勤次数
    List selstaCheckOn(String co_time);
    //正常打卡数
    int  selnormal();
    //异常打卡数
    int selAbnormal();

}
